<?php
namespace qick;


class package
{
    private $regist_array = array();

    public static function sta($path)
    {
        return '//qick/static/'. $path;
    }

    public function html(array $path)
    {
        extract($this->regist_array);  // 分解注册变量
        foreach ($path as $once) {
            include('template/'.$once .'.php');
        }
    }

    public function register($val_array)
    {
        foreach ($val_array as $key => $val) {
            $this->regist_array[$key] = $val;
        }
    }

    public function static_file($file)
    {
        return WEB_PATH. 'static/'. $file;
    }

    public function library($file)
    {
        require('library/'. $file. '.php');
    }
}